﻿using System;
using System.Threading.Tasks;
using battlenet.wow.rt.domain.objects;
using battlenet.wow.rt.sdk.data.dto;
using battlenet.wow.rt.sdk.objects.mapper;

namespace battlenet.wow.rt.sdk.Data.Proxy
{
    internal class ItemDetailProxy : BattlenetApiProxy<ItemDetailInfo>
    {
        public async Task<ItemDetail> GetItemDetail(int itemId)
        {
            var resource = string.Format(BattlenetApiResource.ItemDetail, itemId);
            var response = await RequestDataAsync(resource);

            return response.Remap(new ItemDetailMapper());
        }
    }
}